package com.itany.exceptionHandler;

import com.itany.exception.ManagerUserException;
import com.itany.vo.ActionResult;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestController;



/**
 * Author:梁辰
 * 时间:19-4-2 下午3:03
 * description:
 * version:1.0
 */
@RestController
@ControllerAdvice
public class ManagerUserExceptionHandler {
    @ExceptionHandler(ManagerUserException.class)
    public ActionResult MangaerUserExcption(Exception e) {
        ActionResult rs = new ActionResult();
        rs.setMsg(e.getMessage());
        rs.setStatus(false);
        return rs;
    }
}
